package com.swj.common.log.service;

import com.swj.common.core.model.SysOperaLog;
import com.swj.common.core.remoteService.RemoteLogService;
import com.swj.common.core.constant.SecurityConstants;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;


/**
 * 异步调用日志服务
 * 
 * @author ruoyiSecurityConstants
 */
@Service
public class AsyncLogService {

    @Resource
    private RemoteLogService remoteLogService;

    /**
     * 保存系统日志记录
     */
    @Async
    public void saveSysLog(SysOperaLog sysOperaLog) {
        remoteLogService.add(sysOperaLog, SecurityConstants.INNER);
    }
}
